from django.db import models

# Create your models here.

# 作业数据库模型


# 客户表
class Customers(models.Model):
    name = models.CharField(max_length=100, verbose_name='名称')
    email = models.CharField(max_length=100, verbose_name='邮箱')


# 订单表
class Orders(models.Model):
    customer_id = models.ForeignKey(Customers, models.CASCADE)
    date_ordered = models.DateField(verbose_name='订单时间')
    total_amount = models.DecimalField(max_digits=10, decimal_places=1, verbose_name='价格')
